<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\AdminUser;

class AdminUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $this->command->info('开始创建管理员用户测试数据...');

        // 创建超级管理员
        AdminUser::create([
            'username' => 'admin',
            'email' => 'admin@leyepai.com',
            'name' => '超级管理员',
            'phone' => '13800138000',
            'password' => '123456',
            'role' => AdminUser::ROLE_SUPER_ADMIN,
            'status' => AdminUser::STATUS_ACTIVE,
            'email_verified_at' => now(),
        ]);
        $this->command->info('创建超级管理员: admin@leyepai.com');

        // 创建普通管理员
        AdminUser::create([
            'username' => 'manager',
            'email' => 'manager@leyepai.com',
            'name' => '管理员',
            'phone' => '13800138001',
            'password' => '123456',
            'role' => AdminUser::ROLE_ADMIN,
            'status' => AdminUser::STATUS_ACTIVE,
            'email_verified_at' => now(),
        ]);
        $this->command->info('创建管理员: manager@leyepai.com');

        $this->command->info('管理员用户测试数据创建完成！');
        $this->command->info('登录信息:');
        $this->command->info('超级管理员 - 邮箱: admin@leyepai.com, 密码: 123456');
        $this->command->info('管理员 - 邮箱: manager@leyepai.com, 密码: 123456');
    }
}
